package com.mdxl.second.service;

import com.mdxl.second.Entity.CustomerEntity;
import com.mdxl.second.dao.CustomerRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomerServiceImpl implements CustomerService {

    @Autowired
    CustomerRepository customerRepository;

    @Override
    public CustomerEntity findByTwo(String lastName) {
        return customerRepository.findByLastName(lastName);
    }

    @Override
    public List<CustomerEntity> findAllByFirstName(String first) {
        return customerRepository.findAllByFirstName(first);
    }
}
